package com.huan.cola.customer.listener;

import com.huan.cola.customer.dto.event.CustomerCreateApplicationEvent;
import com.huan.cola.customer.dto.event.CustomerCreateEvent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

import java.util.EventListener;

/**
 * @author bly
 * @date 2023/5/10
 */
@Component
@Order(10)
@Slf4j
public class CustomerCreateEventListener implements ApplicationListener<CustomerCreateApplicationEvent> {

    @Override
    public void onApplicationEvent(CustomerCreateApplicationEvent customerCreateApplicationEvent) {
        log.info("CustomerCreateEventListener====" + customerCreateApplicationEvent.getCustomerId());
    }
}
